package com.tfswue.zqm.config;

import com.tfswue.zqm.listener.MyContextListenger;
import com.tfswue.zqm.listener.MySessionListenger;
import org.springframework.boot.web.servlet.ServletListenerRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ListenerConfig {
    @Bean
    public ServletListenerRegistrationBean<MyContextListenger> myContextListenger(){
        return new ServletListenerRegistrationBean<>(new MyContextListenger());
    }

    @Bean
    public ServletListenerRegistrationBean<MySessionListenger> mySessionListenger(){
        return new ServletListenerRegistrationBean<>(new MySessionListenger());
    }
}
